home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / repmaker.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  2KB  |  89 lines

  1. #ifndef __REPORT_MAKER_H_
  2. #define __REPORT_MAKER_H_
  3.  
  4. #include <stdio.h>
  5.  
  6. /*   ReportMaker class reads report format file, producing PAGE_LAYOUT object.
  7. ______________________________________________________________________________
  8. PAGETOP
  9. Page top information
  10. PAGETOP
  11.  
  12. TABLETOP
  13. Table top information
  14. TABLETOP
  15.  
  16. RECORDTOP
  17. ...
  18. RECORDTOP
  19.  
  20. RECORD
  21. RECORD
  22.  
  23. RECORDBOTTOM
  24. RECORDBOTTOM
  25.  
  26. TABLEBOTTOM
  27. TABLEBOTTOM
  28.  
  29. PAGEBOTTOM
  30. PAGEBOTTOM
  31.  
  32. ______________________________________________________________________________
  33.  
  34.     Inside the band all non-@-started information mean TEXT_INFO.
  35.     Non-text addinfo should be put in header - between band specifier
  36.     and string, containing only @. For example:
  37.  
  38.     @PCX filename name size_x size_y
  39.     mean that every time we type name, ReportMaker will process it as
  40.     PCX picture of given size (cells). (Not supported in 1.0)
  41.  
  42.     Another way - specify addinfo in text. For example:
  43.  
  44.     Hello, friend!
  45.     Today is @date     . Happy New Year!
  46.  
  47.     This text will be splitted to:
  48.     1. Hello, friend!
  49.     2. Today is
  50.     3. DATE_TYPE_INFO
  51.     4. . Happy New Year!
  52.  
  53.     There are:
  54.         @date, @DD, @MM, @YY, @no, @page.
  55.  
  56.     Fields in RECORD BAND. Lets suppose that table have 3 fields:
  57.     Name (A28, wrap 10, 2), Date (D) and Number (N).
  58.     Example:
  59.  
  60. RECORD
  61.     Name of worker:
  62.     @<1>                   @<2>    <--- Date
  63.                            @<3>    <--- Record number
  64.  
  65. RECORD
  66.  
  67. */
  68.  
  69. #include "prn_page.h"
  70.  
  71. class ReportMaker
  72.     {
  73.     protected:
  74.         FILE* f;
  75.         int line;        // From page top
  76.         int bline;       // from band top
  77.  
  78.     public:
  79.         ReportMaker() { line = 0; bline = 0; }
  80.         ~ReportMaker() {}
  81.  
  82.         PAGE_LAYOUT* getPageLayout(char* fileName);
  83.         int get_command(char* buf, int i, ADD_LIST* info,
  84.         FIELD_LIST* flist = NULL);
  85.         int get_band(ADD_LIST* info, FIELD_LIST* flist = NULL);
  86.     };
  87.  
  88.  
  89. #endif __REPORT_MAKER_H_